﻿@model OnlineExam.Entities.PostMeta


<div class="editor-label">
    @Html.LabelFor(model => model.MetaKey)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.MetaKey)
    @Html.ValidationMessageFor(model => model.MetaKey)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.MetaValue)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.MetaValue)
    @Html.ValidationMessageFor(model => model.MetaValue)
</div>

<div class="editor-label">
    Post
</div>
<div class="editor-field">
    @Html.DropDownListFor(model => model.PostID, ((IEnumerable<OnlineExam.Entities.Post>)ViewBag.PossiblePost).Select(option => new SelectListItem {
        Text = (option == null ? "None" : option.Title), 
        Value = option.ID.ToString(),
        Selected = (Model != null) && (option.ID == Model.PostID)
    }), "Choose...")
    @Html.ValidationMessageFor(model => model.PostID)
</div>
